/**
 * detail页面的一些api
 */
import request from '@/config/axios'
export const getVideoById = (id) =>
    request.get({
        url: `/api/onlyforone/videoList/detail/${id}`
    })


export const pageListExample = (queryWrapper) => {
    let realQeryWrapper = {}
    realQeryWrapper.keyword = queryWrapper.keyword
    if (queryWrapper.pageSize) {
        realQeryWrapper.page_size = queryWrapper.pageSize
    }

    if (queryWrapper.pageNumber) {
        realQeryWrapper.page = queryWrapper.pageNumber
    }
    return request.get({
        url: '/api/onlyforone/videoList/list',
        params: realQeryWrapper
    })
}

export const pageCenterExample = (queryWrapper) => {
    let realQeryWrapper = {}
    realQeryWrapper.keyword = queryWrapper.keyword
    if (queryWrapper.pageSize) {
        realQeryWrapper.page_size = queryWrapper.pageSize
    }

    if (queryWrapper.pageNumber) {
        realQeryWrapper.page = queryWrapper.pageNumber
    }
    return request.get({
        url: '/api/onlyforone/videoCenter/list',
        params: realQeryWrapper
    })
}


export const getVideoCenterById = (id:Number) => {
    let realQeryWrapper = {id}
    
    return request.get({
        url: '/api/onlyforone/videoCenter/list',
        params: realQeryWrapper
    })
}

